package yh.core.funcs.workflow.logic;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import yh.core.util.db.YHDBUtility;
//import yh.plugins.business.VacationUtil;

public class YHBusinessLogic {
	 public String getHoliday (String userId,String typeId, Connection conn) throws Exception {
		    String result = "";
//		    String table="yh_t_holiday_num";
//		    Integer type=VacationUtil.getVacationTypeByValue(typeId);
//		    String col="";
//		    if(type>0 && type<6){
//		    	col="VALIDATE_VACATION"+type+"_NUM";
//		    	result="可用";
//		    }else{
//		    	col="USED_VACATION"+type+"_NUM";
//		    	result="已用";
//		    }
//		    String query = "select "+col+" from "+table +" where USER_ID=" + userId;
//		    Statement stm = null;
//		    ResultSet rs = null;
//		    try {
//		      stm = conn.createStatement();
//		      rs = stm.executeQuery(query);
//		      if (rs.next()){
//		        result += (String.valueOf(rs.getFloat(1)));
//		        
//		      }else{
//		    	  result+="0";  
//		      }
//		    } catch(Exception ex) {
//		      throw ex;
//		    } finally {
//		      YHDBUtility.close(stm, rs, null); 
//		    }
		    return result;
		  }
}
